/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cl.mechon.buchef.engine;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.tiled.*;
import cl.mechon.buchef.engine.component.RenderComponent;
/**
 *
 * @author Linkup
 */
public class RenderTiledMap extends RenderComponent{

    TiledMap my_map;

    public RenderTiledMap(String id,Entity owner, TiledMap my_map){
        super(id,owner);
        this.my_map = my_map;
    }
    
    @Override
    public void render(GameContainer gc, StateBasedGame sb, Graphics gr) {
        my_map.render((int)owner.getPosition().getX(), (int)owner.getPosition().getY());
    }

    @Override
    public void update(GameContainer gc, StateBasedGame sb, int delta) {
        this.owner.update(gc, sb, delta);
    }
    
}
